control
Class CState

java.lang.Object
  extended by control.CState

public class CState
extends java.lang.Object

This Class represent a tuple of states, one for each available service


Field Summary
private  State[] commState
           
 
Constructor Summary
CState(State[] array)
           
 
Method Summary
 CState buildNewState(int i, State next)
          creates a new community state replacing the element in the specified position of an existing community state with a next state of an available service
 boolean equals(java.lang.Object o)
           
 State get(int index)
          gets a state of a service specified by the posistion
 int getSize()
          gets the number of states which are in an object CState
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

commState

private State[] commState
Constructor Detail

CState

public CState(State[] array)
Method Detail

get

public State get(int index)
gets a state of a service specified by the posistion

Parameters:
index - - position of the state
Returns:
State

getSize

public int getSize()
gets the number of states which are in an object CState

Returns:
an integer

buildNewState

public CState buildNewState(int i,
                            State next)
creates a new community state replacing the element in the specified position of an existing community state with a next state of an available service

Parameters:
i - - the position in which you want to replace
next - - the state to set in the position i
Returns:
CState created

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object